package tron.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import tron.common.BaseEntity;

import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "tron")
public class Tron extends BaseEntity {
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;
    @TableField(value = "name")
    private String name;
    @TableField(value = "t_1",condition = SqlCondition.NOT_EQUAL)
    private String t1;
    @TableField(value = "t_2",update = "%s + 1")
    private Integer t2;
    @TableField(value = "t_3",insertStrategy = FieldStrategy.NEVER)  // 不加入 SQL
    private String t3;
    @TableField(value = "t_4",insertStrategy = FieldStrategy.NOT_NULL)
    private String t4;
    @TableField(value = "t_5",insertStrategy = FieldStrategy.NOT_EMPTY)
    private String t5;
    @TableField(value = "t_6",insertStrategy = FieldStrategy.IGNORED)
    private String t6;

    @TableField(exist = false)   // 不加该注解，查询时报错
    private List<String> strings;
}
